package com.gilight.base.controller;

import com.gilight.base.aspect.annotation.OperatorLog;
import com.gilight.base.base.ResultEntity;
import com.gilight.base.dto.OperatorLogDto;
import com.gilight.base.service.SysOperatorLogService;
import com.github.pagehelper.PageInfo;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author xuhs
 * @description 操作日志控制类
 * @date 2019/10/17
 */

@RestController
@RequestMapping("/web/sysOperatorLog")
public class SysOperatorLogController {
    @Resource
    private SysOperatorLogService sysOperatorLogService;

    @RequestMapping(value = "/findList", method = RequestMethod.POST)
    public ResultEntity findList(@RequestBody @Validated OperatorLogDto roleDto, HttpServletRequest req) {
        ResultEntity resultEntity = new ResultEntity();
        PageInfo page = sysOperatorLogService.findList(roleDto);
        resultEntity.setData(page);
        return resultEntity;
    }

}
